<template>
  <div class="submit" style="display: flex; align-items: center; justify-content: center; height: 100vh;">
    <div class="wrap">
      <svg-icon icon-class="error" class="svg"/>
      <h2 class="error title">{{ title }}</h2>
      <p class="intro">{{ msg }}</p>
    </div>
  </div>
</template>

<script>
export default {
  name: "public_error",
  data() {
    return {
      title: '',
      msg: ''
    }
  },
  mounted() {
    this.title = this.$route.query.title
    this.msg = this.$route.query.msg
  }
}
</script>

<style lang="scss" scoped>
.wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0 50px;
  margin-top: -60px;

  .svg {
    width: 150px;
    height: 150px;
    animation-name: slideDown;
    animation-duration: 0.5s;
    animation-fill-mode: forwards;
  }

  .title {
    font-size: 32px;
    line-height: 40px;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
    margin-top: 12px;
    animation-name: slideUp;
    animation-duration: 0.5s;
    animation-fill-mode: forwards;
  }

  .success {
    color: #74b9ff;
  }

  .error {
    color: #F56C6C;
  }

  .intro {
    font-size: 13px;
    line-height: 21px;
    color: grey;
    text-align: center;
    animation-name: slideUp;
    animation-duration: 0.5s;
    animation-delay: 0.1s;
    animation-fill-mode: forwards;
  }
}

@keyframes slideUp {
  0% {
    transform: translateY(60px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideDown {
  0% {
    transform: translateY(-60px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}
</style>
